package Error::Hierarchy::Internal::Class;

# $Id: Class.pm 10101 2005-08-09 16:13:58Z gr $

use warnings;
use strict;


our $VERSION = '0.05';


use base 'Error::Hierarchy::Internal';

__PACKAGE__->mk_accessors(qw(class_expected class_got));

use constant default_message => 'expected a [%s] object, got [%s]';

use constant PROPERTIES => ( qw/class_expected class_got/ );

1;


__END__

{% USE p = PodGenerated %}

=head1 NAME

Error::Hierarchy::Internal::Class - when you got an object of a wrong class

=head1 SYNOPSIS

  Error::Hierarchy::Internal::Class->throw(
    class_expected => 'Some::Class',
    class_got      => ref($got_object),
  );

=head1 DESCRIPTION

This class implements an exception that is meant to be thrown when you
expected an object of a certain class somewhere but got an object of a
different class instead.

=head1 PROPERTIES

This exception class inherits all properties of L<Error::Hierarchy::Internal>.

It has the following additional properties.

=over 4

=item class_expected

The class name that you expected.

=item class_got

The class name of the object you actually got.

=back

=head1 METHODS

=over 4

{% p.write_methods %}

=back

{% p.write_inheritance %}

{% PROCESS standard_pod %}

=cut

